home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act2 / 00463.ls < prev    next >
Encoding:
Text File  |  1995-03-28  |  3.9 KB  |  94 lines

  1. on exitFrame
  2.   global prestoloop, moveloop, toplimit, bottomlimit, leftlimit, rightlimit, rewardlist, gametwolevel, bugstatus, origcoord, boxcenter, boxgrid, numbercast, rednumcast, panelcast, bfcast, bgcast, gocast, stopcast, dupnumbers, bugsounds, reachcur, grabcur
  3.   set bugsounds to []
  4.   set numbercast to []
  5.   set rednumcast to []
  6.   set dupnumbers to []
  7.   set bfcast to []
  8.   set bgcast to []
  9.   set stopcast to []
  10.   set gocast to []
  11.   set panelcast to []
  12.   set gjispeedup to 1
  13.   if gjispeedup then
  14.     set numbercast to [24, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25]
  15.     set rednumcast to [289, 280, 281, 282, 283, 284, 285, 286, 287, 288, 290]
  16.     set bfcast to [231, 242, 233, 239, 241, 240, 238, 237]
  17.     set bgcast to [236, 232, 235, 234, 243]
  18.     set stopcast to [87, 88, 94, 100, 132, 105, 129, 99, 122, 126, 124, 120, 118]
  19.     set gocast to [236, 232, 235, 234, 243, 231, 242, 233, 239, 241, 240, 238, 237]
  20.     if (the freeBytes < 300000) or ((the machineType = 256) and (the freeBytes < 700000)) then
  21.       set bfcast to [105, 129, 99, 122, 126, 124, 120, 118]
  22.       set bgcast to [87, 88, 94, 100, 132]
  23.       set gocast to [87, 88, 94, 100, 132, 105, 129, 99, 122, 126, 124, 120, 118]
  24.     end if
  25.     set panelcast to [27, 28, 29, 30, 31, 32, 33, 34]
  26.     set dupnumbers to [459, 460, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482]
  27.   else
  28.     repeat with xxx = 1 to 10
  29.       add(dupnumbers, the number of cast ("dup" & xxx & ".3"))
  30.       add(dupnumbers, the number of cast ("dup" & xxx & ".2"))
  31.     end repeat
  32.     repeat with xxx = 0 to 10
  33.       add(numbercast, the number of cast ("num" & xxx))
  34.       add(rednumcast, the number of cast ("red" & xxx))
  35.     end repeat
  36.     repeat with xxx = 1 to 5
  37.       add(bgcast, the number of cast ("bg" & xxx))
  38.       add(stopcast, the number of cast ("bg" & xxx & ".stop"))
  39.       add(gocast, getAt(bgcast, xxx))
  40.     end repeat
  41.     repeat with xxx = 1 to 8
  42.       add(bfcast, the number of cast ("bf" & xxx))
  43.       add(stopcast, the number of cast ("bf" & xxx & ".stop"))
  44.       add(gocast, getAt(bfcast, xxx))
  45.     end repeat
  46.     add(panelcast, the number of cast "L1.p")
  47.     add(panelcast, the number of cast "L1.s")
  48.     add(panelcast, the number of cast "L2.1")
  49.     add(panelcast, the number of cast "L2.2")
  50.     add(panelcast, the number of cast "L3.larger")
  51.     add(panelcast, the number of cast "L3.largest")
  52.     add(panelcast, the number of cast "L3.smaller")
  53.     add(panelcast, the number of cast "L3.smallest")
  54.   end if
  55.   set origcoord to []
  56.   repeat with xxx = 1 to 10
  57.     set myh to the locH of sprite (xxx + 10)
  58.     set myv to the locV of sprite (xxx + 10)
  59.     add(origcoord, list(myh, myv))
  60.   end repeat
  61.   set boxgrid to []
  62.   set boxgrid to [[339, 148], [414, 148], [457, 148], [518, 148], [384, 206], [480, 206], [339, 265], [414, 265], [457, 265], [518, 265]]
  63.   set bugstatus to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  64.   set blah to (the right of sprite 3 - the left of sprite 3) / 2
  65.   set blav to (the bottom of sprite 3 - the top of sprite 3) / 2
  66.   set boxcenter to list(the left of sprite 3 + blah, the top of sprite 3 + blav)
  67.   set rewardlist to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
  68.   set templist to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  69.   set numberlist to []
  70.   repeat with xxx = 1 to 10
  71.     set holdme to getAt(templist, random(count(templist)))
  72.     add(numberlist, holdme)
  73.     deleteAt(templist, getPos(templist, holdme))
  74.   end repeat
  75.   if gametwolevel = 0 then
  76.     set gametwolevel to 1
  77.   end if
  78.   set toplimit to 10
  79.   set bottomlimit to 349
  80.   set leftlimit to 10
  81.   set rightlimit to the stageRight - the stageLeft - 10
  82.   set prestoloop to marker("presto")
  83.   set moveloop to marker("moveloop")
  84.   repeat with xxx = 44 to 47
  85.     puppetSprite(xxx, 1)
  86.     set the visible of sprite xxx to 0
  87.   end repeat
  88.   set reachcur to the number of cast "cursorpos"
  89.   set grabcur to the number of cast "cursorpos2"
  90.   cursor(4)
  91.   preLoad(marker(1))
  92.   cursor(-1)
  93. end
  94.